package cn.com.wangluotongxin.merchants.model.constants;

public enum GoodsInfoMxAuditStatus {

    WAIT(1, "待审核"),
    AUDIT(2, "审核中"),
    PASS(3, "审核通过"),
    REJECT(4, "审核驳回"),
    RECALL(5, "审核撤回");

    private Integer code;

    public Integer getCode() {
        return code;
    }

    private String name;

    public String getName() {
        return name;
    }

    public static GoodsInfoMxAuditStatus getByCode(Integer code){
        if(code == null){
            return null;
        }else {
            GoodsInfoMxAuditStatus[] auditStatuses = values();
            for(GoodsInfoMxAuditStatus auditStatus : auditStatuses){
                if(auditStatus.getCode().equals(code)){
                    return auditStatus;
                }
            }
        }
        return null;
    }

    GoodsInfoMxAuditStatus(Integer code, String name){
        this.code = code;
        this.name = name;
    }
}
